﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using Raona.Code.Contracts.EventArguments;
using Raona.Code.Model;

namespace Raona.Code.Contracts.Inspection
{
    public interface IOperationContractInspector : IDisposable
    {
        #region Events

        /// <summary>
        /// Event fired on completion of every step in the inspection process
        /// </summary>
        event EventHandler<ProgressEventArgs> ProgressChanged;
        /// <summary>
        /// Event fired when the inspection process finishes
        /// </summary>
        event EventHandler<ProgressResultEventArgs> ProcessFinished;

        #endregion

        #region Properties

        /// <summary>
        /// The collection of namespaces resulting of the inspection process
        /// </summary>
        IEnumerable<Namespace> Namespaces { get; }

        #endregion

        #region Methods

        /// <summary>
        /// Runs an inspection process synchronously
        /// </summary>
        /// <param name="clientBase">The base class for the client class</param>
        /// <param name="serviceContractsNamespace">The xml namespace for the generated contracts</param>
        Dictionary<string, Namespace> GetInterfaces(string clientBase, string serviceContractsNamespace);

        /// <summary>
        /// Initiates the inspection process asynchronously
        /// </summary>
        /// <param name="clientBase">The base class for the client class</param>
        /// <param name="serviceContractsNamespace">The xml namespace for the generated contracts</param>
        void GetInterfacesAsync(string clientBase, string serviceContractsNamespace);

        /// <summary>
        /// Cancels the inspection process
        /// </summary>
        void CancelGetInterfaces();


        #endregion
    }
}
